home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
BUSINESS
/
STATA3.LZH
/
OURDATA.TUT
< prev
next >
Wrap
Text File
|
1988-08-30
|
7KB
|
210 lines
set output error
set display page 23
set more 1
#delimit ;
di _n(23) in wh
" ___ ____ ____ ____ ____ tm" _n
" /__ / ____/ / ____/" _n
"___/ / /___/ / /___/ Data sets provided by C.R.C." _n
"------------------------------------------------------------"
_n(2) ;
#delimit cr
mac def path
capture run nullfile.tut
if _rc {
mac def path "\stata\"
capture run %path`nullfile.tut
if _rc {
mac def path "/usr/stata/"
capture run %path`nullfile.tut
if _rc {
#delimit ;
di in red
"I cannot find the other tutorial files. I have looked in the current" _n
"directory and in \stata (DOS) or /usr/stata (Unix). Is Stata installed" _n
"correctly?" _n(2)
"In any case, I cannot run the tutorial." ;
#delimit cr
exit
}
}
}
macro define F5 "do %path`contents.tut;"
macro define F6 "do %path`ourdata.tut;"
#delimit ;
di in gr
"Whether you have the demonstration system or the full package, we provide "
"seven" _n
"data sets to get you started. They are:" _n(2)
_col(9) "Name of data set" _col(41) "How to use it" _n
_col(9) _dup(16) "-" _col(41) _dup(31) "-" _n
in ye _col(9) "auto.dta" _col(41) in wh "use %path`auto, clear" _n
in ye _col(9) "census.dta" _col(41) in wh "use %path`census, clear" _n
in ye _col(9) "hsng.dta" _col(41) in wh "use %path`hsng, clear" _n(2)
in ye _col(9) "kva.dta" _col(41) in wh "use %path`kva, clear" _n
in ye _col(9) "cancer.dta" _col(41) in wh "use %path`cancer, clear" _n(2)
in ye _col(9) "systolic.dta" _col(41) in wh "use %path`systolic, clear" _n
in ye _col(9) "sysage.dta" _col(41) in wh "use %path`sysage, clear" _n(2)
in gr
"Feel free to experiment with them." _n ;
set more 0 ; more ; set more 1 ;
di _n(2) in wh
"auto.dta" _n
"--------" _n ;
di _n in wh _dup(79) "-" _n in gr
"To load the automobile data, you type:" _n
in wh _dup(79) "-" _n(3)
". use %path`auto, clear" ;
noisily use %path`auto, clear ;
di _n(2) in wh _dup(79) "-" _n in gr
"This data originally came from Consumer Reports, April 1979, and from the" _n
"United States Government EPA statistics on fuel consumption. It was com-" _n
"piled and published in "
in ye "Graphical Methods for Data Analysis" in gr ", The Wadsworth" _n
"Statistics/Probability Series, 1983." _n(2)
"You can discover the contents of a data set by typing '"
in wh "describe" in gr "':" _n
in wh _dup(79) "-" _n(2)
". describe" ;
set more 0 ; more ; set more 1 ;
noisily describe ;
di _n in wh _dup(79) "-" _n in gr
"The automobile data contains information on 74 cars. You should be able to" _n
"figure out the data based on the description." _n
in wh _dup(79) "-" _n ;
set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"Another good way to learn about a data set is to '"
in wh "summarize" in gr "' it. When you type" _n
"'" in wh "summarize" in gr
"' without arguments, all the variables are summarized:" _n
in wh _dup(79) "-" _n(3)
". summarize" ;
noisily summarize ;
di ; set more 0 ; more ; set more 1 ;
di in wh _dup(79) "-" _n in gr
"There are zero observations on make because it is a string variable. There"
_n
"are 69 observations on rep78 because there are some missing values." _n
in wh _dup(79) "-" _n ;
set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"You can learn more about categorical variables by tabulating them. Compare" _n
in wh "tabulate" in gr " with " in wh "summarize" in gr ":" _n
in wh _dup(79) "-" _n(2)
". summarize rep78" ;
noisily summarize rep78 ;
di _n in wh ". tabulate rep78" ;
noisily tabulate rep78 ;
set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"Next on our list is the Census data:" _n
in wh _dup(79) "-" _n(2)
". use %path`census, clear" ;
noisily use %path`census, clear ;
di _n in wh ". describe" ;
noisily describe ;
set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"Again, we learn more about the data by summarizing it:" _n
in wh _dup(79) "-" _n(2)
". summarize" ;
noisily summarize ;
di _n in wh _dup(79) "-" _n in gr
"There are zero observations on state because it is a string variable." _n
in wh _dup(79) "-" ;
set more 0 ; more ; set more 1 ;
di _n(15) in wh _dup(79) "-" _n in gr
"Now let's look at " in ye "hsng.dta" in gr
". It also contains 1980 Census data on the 50" _n
"states, only this data concerns the value and cost of housing." _n
in wh _dup(79) "-" _n(2)
". use %path`hsng, clear" ;
noisily use %path`hsng, clear ;
di _n in wh ". describe" ;
set more 0 ; more ; set more 1 ;
noisily describe ;
di _n ; set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in ye
"kva.dta" in gr
" contains failure time for a fictional experiment with generators. We" _n
"used this data in our tutorial on survival analysis:" _n
in wh _dup(79) "-" _n(3)
". use %path`kva, clear" ;
noisily use %path`kva, clear ;
di _n in wh ". describe" ;
noisily describe ;
di _n(2); set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"We also used "
in ye "cancer.dta" in gr " in our survival analysis tutorial. It contains fic-"
_n
"tional data on a drug trial:" _n
in wh _dup(79) "-" _n(2)
". use %path`cancer, clear" ;
noisily use %path`cancer, clear ;
di _n in wh ". describe" ;
noisily describe ;
di _n(2) ; set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in gr
"We used " in ye "systolic.dta" in gr
" in our tutorial on ANOVA. This is one of the classic" _n
"data sets for two-way analysis-of-variance designs. It is from A. A. Affi" _n
"and S. P. Azen, "
in ye "Statistical Analysis: A Computer-Oriented Approach" in gr ", Academic"
_n
"Press, 1972." _n
in wh _dup(79) "-" _n(3)
". use %path`systolic, clear" ;
noisily use %path`systolic, clear ;
di _n in wh ". describe" ;
noisily describe ;
di _n(2) ; set more 0 ; more ; set more 1 ;
di _n(2) in wh _dup(79) "-" _n in ye
"sysage.dta" in gr " is the same as " in ye "systolic.dta" in gr
" except that it contains a fourth var-" _n
"iable, age. When we wrote the ANOVA tutorial, we needed a continuous variable"
_n
"to illustrate analysis of covariance. The variable is not real data." _n
in wh _dup(79) "-" _n(3)
". use %path`sysage, clear" ;
noisily use %path`sysage, clear ;
di _n in wh ". describe" ;
noisily describe ;
di _n(2) ; set more 0 ; more ; set more 1 ;
drop _all ;
label drop _all ;
macro define F6 "do %path`yourdata.tut;";
di _n(4) in white
"Demonstration ends" _n
"------------------" _n ;
di in green
"That concludes our short demonstration, but there's much more. We now return"
_n
"control to you. Some suggestions:" _n ;
di in green
"If you ..." _col(34) "Then we will show you ..." _n
" Press " in white "F5" in green _col(38) "a table of tutorial contents" _n
" Press " in white "F6" in green _col(38) "the next tutorial, "
in white "yourdata.tut" _n ;
run %path`tobuy.tut ;